#pragma once
#include <nice2d/action.h>
#include <nice2d/updater.h>
#include <nice2d/piece/piecescene.h>

enum FactionControllerType
{
    FactionControllerType_User = 0,
    FactionControllerType_AI = 0,
};

class FactionController : public Updater
{
public:
    FactionController();
    virtual ~FactionController();
public:
    void setControllerType(FactionControllerType type);
    FactionControllerType getControllerType()const;

    void setFactionColor(const sf::Color& color);
    sf::Color getFactionColor()const;

    void setPieceScene(std::shared_ptr<PieceScene> scene);
    std::weak_ptr<PieceScene> getPieceScene()const;

    void reqireNewAction();
    bool isReqireNewAction()const;

    void update(float deltaTime)override;
    boost::signals2::signal<void(std::shared_ptr<Action>)> actionCreated;
private:
    std::unique_ptr<class FactionControllerData> data;
};
